package Lee_code;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

public class Lee_131 {

    List<List<String>> res = new ArrayList<>();
    HashSet<String> hashSet = new HashSet<>();
    char[] in;
    public List<List<String>> partition(String s) {
        in = s.toCharArray();

        for(int k=0; k< s.length(); k++)
        {
            start_huiwen(k,k,s);
            start_huiwen(k,k+1,s);
        }

        return  res;
    }
    public void start_huiwen(int left, int right, String s)
    {
        while(left>=0&&right<in.length)
        {
            if(in[left] == in[right])
            {
                hashSet.add(s.substring(left, right+1));
                left--;
                right++;
            }
            else
                break;
        }
    }
    public static void main(String[] args) {

    }
}
